package com.edu.exam.enums.analysis;

/**
 * 改进优先级枚举
 */
public enum ImprovementPriority {
    HIGH("HIGH", "高优先级"),
    MEDIUM("MEDIUM", "中优先级"),
    LOW("LOW", "低优先级"),
    NONE("NONE", "无需改进");

    private final String code;
    private final String description;

    ImprovementPriority(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static ImprovementPriority fromCode(String code) {
        for (ImprovementPriority priority : values()) {
            if (priority.getCode().equals(code)) {
                return priority;
            }
        }
        return NONE;
    }
}